package com.jsbj.user.entities;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 租户菜单表
 * </p>
 *
 * @author jsbj
 * @since 2022-03-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysTenantPermission对象", description="租户菜单表")
public class SysTenantPermission implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "表ID")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "sys_tenant表tenant_code")
    private String tenantCode;

    @ApiModelProperty(value = "如果是菜单类型sys_permission_all表permission_code；如果是目录可自定义")
    private String menuCode;

    @ApiModelProperty(value = "如果是菜单类型sys_permission_all表permission_name，可修改；如果是目录可自定义")
    private String menuName;

    @ApiModelProperty(value = "父级表ID")
    private String parentId;

    @ApiModelProperty(value = "菜单类型(存放字典key，具体名称看字典表)")
    private String menuTypeKey;

    @ApiModelProperty(value = "菜单类型（存放字典value，具体名称看字典表）")
    private String menuTypeValue;

    @ApiModelProperty(value = "pc首页图片地址")
    private String pcHeadPath;

    @ApiModelProperty(value = "pc模块图片地址")
    private String pcModulPath;

    @ApiModelProperty(value = "app模块图片地址")
    private String appModulPath;

    @ApiModelProperty(value = "pc是否展示  0可用 1不可用")
    private Integer pcShow;

    @ApiModelProperty(value = "app是否展示  0可用 1不可用")
    private Integer appShow;

    @ApiModelProperty(value = "是否外链")
    private String isFrame;

    @ApiModelProperty(value = "路由地址")
    private String path;

    @ApiModelProperty(value = "app路由地址")
    private String appPath;

    @ApiModelProperty(value = "是否h5 true  false")
    private Boolean isH5;

    @ApiModelProperty(value = "应用标识")
    private String activeRule;

    @ApiModelProperty(value = "blank新窗口打开，inner当前窗口打开")
    private String openType;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "是否可用  0可用 1不可用")
    @TableField(fill = FieldFill.INSERT)
    private Integer disabled;

    @ApiModelProperty(value = "创建人用户ID")
    private String createrId;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date createTime;

    @ApiModelProperty(value = "最后变更人用户ID")
    private String updateId;

    @ApiModelProperty(value = "最后变更时间")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date updateTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "是否是系统菜单 0否，1是配置中心，2是个人中心")
    private String isSystemMenu;

    @TableField(exist = false)
    private List<SysTenantPermission> childs;

    @ApiModelProperty(value = "菜单类型描述")
    @TableField(exist = false)
    private String permissionTypeDesc;

    @ApiModelProperty(value = "删除按钮")
    @TableField(exist = false)
    private boolean del;

    @ApiModelProperty(value = "创建时间")
    @TableField(exist = false)
    private String updateTimeStr;

    @ApiModelProperty(value = "菜单类型(存放字典key，具体名称看字典表)")
    @TableField(exist = false)
    private String menuTypeDesc;


}
